home *** CD-ROM | disk | FTP | other *** search
- /*
- //
- // Viewer
- //
- //
- //
- // Rodrigo REYES 1993
- //
- // freeware
- //
- //
- // Lors de la compilation, ce fichier devra être linké au fichier
- // objet DSIC.o.
- //
- //
- //
-
- //
- // Les includes suivants sont ceux du système 3.0.
- */
-
- #include <exec/types.h>
- #include <stdio.h>
-
- #include <Dsic.h> /* Protos du module de gestion dynamique */
- /* des chaines. Bientôt disponible en DP */
-
- #include <proto/dos.h>
- #include <dos/dosasl.h>
- #include <workbench/workbench.h>
- #include <workbench/startup.h>
- #include <workbench/icon.h>
- #include <proto/icon.h>
- #include <libraries/dosextens.h>
-
- #include <proto/exec.h>
- #include <intuition/screens.h>
- #include <pragmas/intuition_pragmas.h>
- #include <proto/graphics.h>
- #include <graphics/modeid.h>
- #include <proto/gadtools.h>
-
- struct IntuitionBase *IntuitionBase;
-
- #include "display.c" /* source fourni par GadToolsBox 1.4 */
-
- #include <exec/ports.h>
- #include <intuition/intuition.h>
-
- #include <clib/dos_protos.h>
- #include <exec/libraries.h>
- #include <libraries/asl.h>
- #include <clib/exec_protos.h>
- #include <clib/asl_protos.h>
-
- #include "FileSize.c" /* module permettant de savoir la */
- /* taille d'un fichier */
-
-
- /*------------------------- Les variables globales ------------------*/
-
- #define MODE_NIL 2
- #define MODE_CLI 1
- #define MODE_WB 0
-
-
- int QuietMode=0;
- int delay=-1;
-
- char *TheName;
-
- struct Library *AslBase = NULL;
- struct FileRequester *fr;
-
- char Name[256],comp,mod;
- long MemBlock,BlockSize; /* block de mémoire pour l'image */
- short sX,sY,sD;
- int MODE;
- int cyc1=0,cyc2=0; /* les options d'affichage */
- /* cyc1 = 0 : default */
- /* cyc1 = 1 : LoRes */
- /* cyc1 = 2 : HiRes */
- /* cyc1 = 3 : SuperHiRes */
-
- /* cyc2 = 0 : default */
- /* cyc2 = 1 : Lace */
- /* cyc2 = 2 : NoLace */
-
- /* Correspondant au Cycling Gadget */
-
- int LOADED=0; /* flag permettant de savoir si l'image est chargée */
-
- UWORD Mask[]= {1,2,4,8,16,32,64,128,256};
- /* nombre de couleurs par bitplans */
-
-
- /*--------------- See you later, proto ? -------------*/
-
-
- void DoCli(int, char **); /* si chargé par le CLI */
- void ProceedWithFile(char *); /* Charger et afficher le fichier */
- void DoWB(struct WBStartup *); /* si chargé par le WB */
-
- void Set2Zero(void); /* RAZ des paramètres */
-
- void DoPannel(void); /* affiche et gère le panneau de contrôle */
-
- void OpenLibs(void);
- void CloseLibs(void);
-
- void GetMemFile(char *); /* allocation et chargement du nom de fichier */
- void DropFileMem(void); /* désallocation de la mémoire allouée */
- int Search(char *); /* routine de recherche de chaine dans MemBlock */
- void LookILBM(void); /* Affichage de l'image ILBM */
- void ReadBody(struct Screen *); /* Affichage du corps de l'image */
-
- void LoadOneFile(void); /* gestion du requester */
-
- void RendCycle(struct Gadget *,long ); /* gestion des cycling gadgets */
-
- char GetFile(char *,int); /* affiche le requester */
- void InitReq(char *); /* initialise le requester */
- void FreeReq(void); /* libère le requester */
-
- void Print(int ,int ,char *); /* bête routine d'affichage */
- void PrintInfo(void); /* affichage des infos sur le fichier ILBM */
- void Clear(void); /* nettoie la fenêtre d'affichage des info */
- void WaitClick(void); /* attend un click ou un delay */
-
-
- /*------------------ Routines Principales ---------------*/
-
- void main(int ArgC, char *ArgV[])
- {
- if ( ArgC == 1 ) DoPannel(); // Help ?
- if ( ArgC > 1 ) DoCli(ArgC, (char **)ArgV); // It came from the CLI
- if (ArgC==0) DoWB((struct WBStartup *)ArgV); // It came from the workbench
- return;
- }
-
-
-
-
- /*------------------- APPEL PAR LE CLI -----------------*/
-
- void DoCli(int Count, char *args[])
- {
- short j;
- long Membloq;
- struct AnchorPath *ap;
- long loq;
-
- MODE = MODE_CLI;
-
- OpenLibs();
-
- /*-------------------- Analyse des arguments ------------------------*/
-
- for (j=1; j<Count; j++)
- {
- if (StringCompNC("LACE",args[j])) cyc2=1;
- else if (StringCompNC("NOLACE",args[j])) cyc2=2;
- else if (StringCompNC("LORES",args[j])) cyc1=1;
- else if (StringCompNC("HIRES",args[j])) cyc1=2;
- else if (StringCompNC("SHIRES",args[j])) cyc1=3;
- else if (StringCompNC("QUIET",args[j])) QuietMode=1;
- else if (StringCompNC("DELAY",args[j]) && j<(Count-1)) delay = StringVal(args[++j]);
- else if (StringCompNC("FILE",args[j]) && j<(Count-1)) TheName = args[++j];
- else if (!TheName) TheName = args[j];
-
- }
-
- if (TheName==0) { CloseLibs(); return;}
-
-
- /* ------------ Allocation du AnchorPath, pour les Patterns ----*/
-
- Membloq = (long) AllocMem( sizeof(struct AnchorPath)+1028,(1<<0+1<<16) );
-
- ap = (struct AnchorPath *)((Membloq+3)&0xfffffff0);
- ap->ap_Strlen = 1024;
-
-
- /* --------------- traitement des fichiers ----------------- */
-
- if ( loq = Lock(TheName,-2) ) /* si c'est un simple fichier */
- {
- ProceedWithFile(TheName);
- UnLock(loq);
- }
-
- else if ( MatchFirst(TheName,ap) ==0) /* si c'est un motif */
- {
- while ( MatchNext(ap) == 0) /* les faire tous */
- {
- if (ap->ap_Info.fib_DirEntryType<0 && StringIndexNC(".info",ap->ap_Buf)==0)
- ProceedWithFile(ap->ap_Buf);
- }
- MatchEnd(ap);
- }
-
- else if (!QuietMode)printf("Pattern not found!\n");
-
-
- /* ------------ la fin ... --------------- */
-
- FreeMem((APTR)Membloq, sizeof(struct AnchorPath)+1028 );
- CloseLibs();
- }
-
- /* ----------- Mise en Oeuvre de la machinerie ------------- */
-
- void ProceedWithFile(char *file)
- {
- Print(0,0,"File : ");
- Print(0,0,file);
- Print(0,0,"\n");
- GetMemFile(file);
- PrintInfo();
- LookILBM();
- DropFileMem();
- Print(0,0,"\n");
- return;
- }
-
- /*------------------ SI DES FICHIERS SONT APPELES VIA LE WB ----*/
-
- void DoWB(struct WBStartup *wbstart)
- {
- short i;
- long olddir,Tools,curval;
- struct DiskObject *Loq;
- struct WBArg *wbarg;
- char onename[512];
-
- MODE= MODE_CLI;
-
- OpenLibs();
-
- if ( !(IconBase = OpenLibrary("icon.library",0))) return;
- if (wbstart==0) { CloseLibrary(IconBase); CloseLibs(); return; }
-
- if (wbstart->sm_NumArgs==1) DoPannel(); /* si on clique sur VIEWER /*
- else
-
- /* ALORS POUR CHAQUE ARGUMENT */
-
- for (i=1,wbarg = (wbstart->sm_ArgList)+1; i<wbstart->sm_NumArgs ;i++, wbarg++)
- {
- Set2Zero();
-
- olddir = CurrentDir(wbarg->wa_Lock);
- Loq = GetDiskObject(wbarg->wa_Name);
-
- if (Loq) /* si le fichier existe (on ne sait jamais...) */
- {
- NameFromLock(wbarg->wa_Lock,onename,512);
- AddPart(onename,wbarg->wa_Name,512);
-
- Tools = (long) Loq->do_ToolTypes;
-
- if (FindToolType((UBYTE **)Tools,"LORES")) cyc1=1;
- if (FindToolType( (UBYTE **)Tools,"HIRES")) cyc1=2;
- if (FindToolType((UBYTE **)Tools,"SHIRES")) cyc1=3;
- if (FindToolType((UBYTE **)Tools,"LACE")) cyc2=1;
- if (FindToolType((UBYTE **)Tools,"NOLACE")) cyc2=2;
- if (curval = (long) FindToolType((UBYTE **)Tools,"DELAY"))
- delay = (StringVal( (char *)curval));
-
- FreeDiskObject(Loq);
-
- GetMemFile(onename);
- LookILBM();
- DropFileMem();
-
- }
- CurrentDir(olddir);
-
- }
-
- CloseLibrary(IconBase);
- CloseLibs();
- }
-
- /*------------------- RAZ des paramètres d'affichages ------------*/
- void Set2Zero()
- {
- cyc1=0;
- cyc2=0;
- delay = -1;
- }
-
- /*---------------------- Les Autres ROUTINES -----------*/
-
-
- /*--------------Affiche le superbe :-) panneau de contrôle --*/
-
- void DoPannel()
- {
- short back=1,norem;
- struct StringInfo *strinf;
- struct IntuiMessage *msg;
- struct Gadget *gad;
- ULONG class;
-
- OpenLibs();
-
- /*------------------- mise en place de la fenètre ----------- */
-
- SetupScreen();
- OpenILBMViewerWindow();
- ILBMViewerRender();
-
- InitReq("Please select an iff-ilbm file"); /* init du requester */
-
- MODE = MODE_WB;
-
- while(back) /* TANT QUE pas fini */
- {
- msg = (struct IntuiMessage *)WaitPort(ILBMViewerWnd->UserPort);
- msg = (struct IntuiMessage *)GetMsg(ILBMViewerWnd->UserPort);
- class = msg->Class;
-
- if (class == IDCMP_GADGETUP)
- {
- gad = (struct Gadget *)msg->IAddress;
- if (gad->GadgetID == GD_FWGadget)
- {
- ++cyc1;
- if (cyc1>3) cyc1=0;
- RendCycle(gad,cyc1);
- /* FORCEGADGET */
- }
- if (gad->GadgetID == GD_FHGadget)
- {
- ++cyc2;
- if (cyc2>2) cyc2=0;
- RendCycle(gad,cyc2);
- /* FORCEGADGET */
- }
-
- if (gad->GadgetID == GD_LoadGadget)
- LoadOneFile(); /* Appel du REQUESTER */
-
- if (gad->GadgetID == GD_ShowGadget)
- LookILBM(); /* AFFICHAGE */
-
- if (gad->GadgetID == GD_StringGadget)
- { DropFileMem();
- strinf = (struct StringInfo *)gad->SpecialInfo;
- GetMemFile((char *) strinf->Buffer);
- PrintInfo();
- }
- }
- if (class == IDCMP_CLOSEWINDOW)
- back = 0;
-
- ReplyMsg( (struct Message *) msg);
-
-
-
- /* ------ Met au vide-ordure tous les messages en trop ------- */
-
- norem=1;
- while (norem)
- { msg = (struct IntuiMessage *)GetMsg(ILBMViewerWnd->UserPort);
- if (msg) ReplyMsg( (struct Message *)msg);
- else norem=0;
- }
- }
- DropFileMem();
-
- CloseILBMViewerWindow();
- CloseDownScreen();
-
- FreeReq();
-
- CloseLibs();
-
- }
-
- /* ------------------ Ouvre toutes les bibliothèques ------ */
-
- void OpenLibs()
- {
- IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",0);
- DOSBase = (struct DosLibrary *)OpenLibrary("dos.library",0);
- GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",0);
- AslBase = OpenLibrary("asl.library",37l);
- GadToolsBase = OpenLibrary("gadtools.library",0);
- StringBufferInit(10000);
-
- }
-
- /* ---------------- Ferme toutes les bibliothèques --------- */
-
- void CloseLibs()
- {
- if (GfxBase) CloseLibrary( (struct Library *) GfxBase);
- if (IntuitionBase) CloseLibrary( (struct Library *) IntuitionBase);
- if (DOSBase) CloseLibrary( (struct Library *) DOSBase);
- if (AslBase) CloseLibrary( (struct Library *) AslBase);
- if (GadToolsBase) CloseLibrary(GadToolsBase);
- StringBufferEnd();
- }
-
-
-
-
-
-
- /* ------------------- Gère le cycling gadget ---------------- */
-
- void RendCycle(struct Gadget *gd,long cyc)
- {
- GT_SetGadgetAttrs(gd,ILBMViewerWnd,0,GTCY_Active,(ULONG) cyc,TAG_DONE);
- GT_RefreshWindow(ILBMViewerWnd,0);
-
- }
-
-
-
-
- /* -------------- Chargement d'un FICHIER --------------*/
-
- void LoadOneFile()
- {
- int dummy,d1;
- char *c;
- struct StringInfo *ST;
-
- char *file,*cd,*ct;
-
-
- // APPEL DU REQUESTER
- //
- ST = (struct StringInfo *)ILBMViewerGadgets[GDX_StringGadget]->SpecialInfo;
- c= ST->Buffer;
- file = FilePart(c);
- ct = (char *)fr->fr_File;
- cd = file;
- while (*cd) *ct++=*cd++; *ct=0;
-
- ct = (char *)fr->fr_Drawer;
- cd=c;
- file = PathPart(c);
- while (cd<file) *ct++ = *cd++; *ct=0;
-
- for (d1=0; d1<255; d1++) Name[d1]=*c++;
- dummy = GetFile(Name,255);
-
- // SI UN FICHIER EST CHOISI
- //
- if (dummy)
- {
- //
- // COPIE
- //
- ST = (struct StringInfo *)ILBMViewerGadgets[GDX_StringGadget]->SpecialInfo;
- c= ST->Buffer;
- for(d1=0; d1<255; d1++) *c++=Name[d1];
-
- RefreshGadgets(ILBMViewerGadgets[0],ILBMViewerWnd,0);
-
- DropFileMem();
- GetMemFile((char *)&Name);
-
- // ILBM ??
- //
- d1 = Search("ILBM");
- if (d1!=-1) { LOADED=1; PrintInfo();}
-
- }
- }
-
-
-
-
-
- /* --- RESERVATION DE LA MEMOIRE ET CHARGEMENT DU FICHIER ---- */
-
- void GetMemFile(char *File)
- {
- int size;
- struct FileHandle *handle;
-
- MemBlock=0;
- size = FileSize(File);
- if (size)
- {
- BlockSize = size;
- MemBlock = (long)AllocMem(size,1l<<16);
- handle = (struct FileHandle *)Open(File,1005);
- Read((BPTR)handle,(APTR)MemBlock,size);
- Close((BPTR)handle);
- return;
- }
- }
-
-
- /*------------- REND LA MEMOIRE --------------------*/
-
- void DropFileMem()
- {
- if (MemBlock)
- {
- FreeMem((APTR)MemBlock,BlockSize);
- }
- MemBlock=0;
-
- }
-
-
- /* ---------- FONCTION DE RECHERCHE D'UNE CHAINE ------- */
-
- int Search(char *String)
- {
- int size;
- char *dum;
- char *Start,*SD;
- int i=0;
-
- size=0; dum=String;
- while(*dum++) ++size;
-
- for (Start=(char *)MemBlock ; (long)Start<=(MemBlock+BlockSize); )
- {
- if (*Start==*String)
- {
- SD=Start;
- for (i=0;i<size;)
- {
- if ( SD[i] != String[i]) break;
- ++i;
- }
- if (i==size) return((int)Start);
- }
- ++Start;
- }
- return(0);
- }
-
-
- /* -------- INFOS sur l'image -----------------*/
-
- void PrintInfo()
- {
- char *c1,*c2,*c3;
- UWORD *T;
- T = (UWORD *)Search("BMHD");
- if (MODE == MODE_WB) Clear();
- if (MemBlock)
- {
- if ((int)T!=0)
- {
- sX=T[4]; sY=T[5];
- sD=T[8]>>8;
- comp=T[9]>>8;
-
- c1 = StringDec(sX);
- c2 = StringDec(sY);
- c3 = StringAdd("IFF Picture ",c1);
- c3 = StringUnion(c3,"x");
- c3 = StringUnion(c3,c2);
- Print(0,0,c3);
- StringDelete(c1); StringDelete(c2); StringDelete(c3);
-
- T = (UWORD *) (Search("CAMG")+8);
- c1 = StringDec(sD);
- c2 = StringAdd("Depth : ",c1);
- c2=StringUnion(c2," ");
- if (T)
- {
- if (T[1]&HAM) c2=StringUnion(c2,"HAM ");
- if (T[1]&LACE) c2=StringUnion(c2,"LACE ");
- if (T[1]&SUPERHIRES) c2=StringUnion(c2,"SUPERHIRES");
- if (T[1]&HIRES) c2=StringUnion(c2,"HIRES ");
- }
- Print(0,8,c2);
- StringDelete(c1); StringDelete(c2);
-
- }
- else Print(0,0,"File is not an IFF picture!");
- }
- else Print(0,0,"No file Loaded");
-
- }
-
-
- /* ---------- ANALYSE et AFFICHAGE DU FICHIER ILBM -------- */
-
- void LookILBM()
- {
- struct Screen *screen;
- UWORD *T;
- ULONG dispID;
- short j;
- unsigned char *ccol;
- ULONG *colortable;
-
- T = (UWORD *)Search("BMHD");
- if ((int)T!=0 && MemBlock)
- {
- sX=T[4]; sY=T[5];
- sD=T[8]>>8;
-
- if (sD>8) {
- Print(0,18,"Can't display so many bitplanes !");
- return;
- }
-
- comp=T[9]>>8;
-
- mod = T[4]%8;
-
- dispID = LORES_KEY;
- if (sY>320)
- {
- if (sX>320 && sX<870) dispID=HIRESLACE_KEY;
- if (sX>869) dispID=SUPERLACE_KEY;
- if (sX<321) dispID=LORESLACE_KEY;
- }
- else
- { if (sX>320 && sX<870) dispID=HIRES_KEY;
- if (sX>869) dispID=SUPER_KEY;
- }
-
- T = (UWORD *) (Search("CAMG")+8);
- if (T[1]& HAM) dispID|=HAM_KEY;
- if (T[1]& LACE) dispID|=LACE;
- if (T[1]& EXTRA_HALFBRITE) dispID |=EXTRA_HALFBRITE;
- if (T[1]& HIRES ) dispID |= HIRES;
-
- if (cyc1==1) dispID = dispID & (0xffffffff-HIRES-SUPERHIRES);
- if (cyc1==2) dispID = (dispID & (0xffffffff-SUPERHIRES-HIRES))+HIRES;
- if (cyc1==3) dispID = (dispID & (0xffffffff-HIRES-SUPERHIRES))+SUPERHIRES+HIRES;
-
- if (cyc2==1) dispID |= LACE;
- if (cyc2==2) dispID &= (0xffffffff-LACE);
-
- colortable = AllocMem(4+(3*4*256),1<<0+1<<16);
-
- ccol = (char *)(Search("CMAP")+8);
- j=0;
- if (ccol)
- {
- colortable[j++]= Mask[sD]<<16;
- for (; j<((Mask[sD]*3)+1);)
- { colortable[j++]=((*ccol++)<<24)+0xffffff;
- colortable[j++]=((*ccol++)<<24)+0xffffff;
- colortable[j++]=((*ccol++)<<24)+0xffffff;
- }
- colortable[j++]=0;
- }
-
- screen = OpenScreenTags(0,
- SA_DisplayID, dispID,
- SA_Left, 0,
- SA_Top,0,
- SA_Width, sX,
- SA_Height, sY,
- SA_Depth, sD,
- SA_Type, CUSTOMSCREEN,
- SA_Colors32, colortable,
- SA_Title, "ILBM-Viewer",
- SA_AutoScroll, TRUE,
- TAG_DONE);
-
- if (screen) { ReadBody(screen); WaitClick(); }
- else Print(0,16,"Can't display picture !");
-
- if (screen) CloseScreen(screen);
- if (colortable) FreeMem(colortable,4+(3*4*256));
-
- }
- }
-
-
-
-
- /* ------------ LECTURE DU CORPS (BODY) ---------------- */
-
- void ReadBody(struct Screen *SC)
- {
- int T;
- short modulo;
- unsigned short bp,row;
- register short ddum,ddum1,y;
- char *adr,*ptr,buf;
- unsigned char doumdoum;
- long lim=MemBlock+BlockSize;
- short row2;
-
- row2=((SC->Width+15)&(0xfff0))>>3; // /8
-
- row = SC->BitMap.BytesPerRow;
-
-
- modulo = SC->Width%8;
-
-
- T= Search("BODY");
- ptr = (char *) (T+8);
- if (T!=(int)0)
- {
- for (y=0; y<SC->Height; y++)
- {
- for (bp=0; bp<SC->Depth; bp++)
- {
- adr = (char *) (SC->RastPort.BitMap->Planes[bp]+(y*row));
-
- if (comp==0)
- for(ddum=0; ddum<row2; ddum++)
- *adr++ = *ptr++;
-
-
- if (comp==1)
- {
- ddum=0;
- while (ddum<row2)
- {
- doumdoum = *ptr++;
- if (doumdoum<128)
- for( ddum1=0; ddum1<=doumdoum; ddum1++,ddum++)
- *adr++ = *ptr++;
- if (doumdoum>128)
- {
- buf = *ptr++;
- for (ddum1=0; ddum1<(257-doumdoum); ddum1++,ddum++)
- *adr++= buf;
- }
- // if (ddum>row) printf("Row dépassé\n");
- }
- }
- }
-
- if ((int)ptr>lim) return;
-
- }
- }
- }
-
-
- /*------------------ FONCTIONS DU REQUESTER -------------------- */
-
-
- #define MYLEFTEDGE 0
- #define MYTOPEDGE 0
- #define MYWIDTH 320
- #define MYHEIGHT 190
-
- void InitReq(char *title)
- {
- struct TagItem frtags[] =
- {
- ASL_Hail, (ULONG) "",
- ASL_Height, MYHEIGHT,
- ASL_Width, MYWIDTH,
- ASL_LeftEdge, MYLEFTEDGE,
- ASL_TopEdge, MYTOPEDGE,
- ASL_OKText, (ULONG)"Select",
- ASL_CancelText, (ULONG)"Cancel",
- ASL_File, (ULONG) "",
- ASL_Dir, (ULONG) "",
- ASLFR_RejectIcons, (ULONG) 1,
- TAG_DONE
- };
- frtags[0].ti_Data=(ULONG) title;
- if (AslBase)
- fr = (struct FileRequester *) AllocAslRequest(ASL_FileRequest,frtags);
-
- }
-
- char GetFile(char *buffer,int size)
- {
- char *i,*d,tobereturned=0;
- short j;
-
- d=buffer;
- if (AslRequest(fr, NULL))
- {
- i=fr->rf_Dir;
- for (j=0; j<250; j++) buffer[j]=0;
- while (*i) *d++=*i++;
- AddPart(buffer,fr->rf_File,size);
- tobereturned=1;
- }
-
- return(tobereturned);
- }
-
- void FreeReq()
- {
- if (AslBase)
- {
- if (fr) FreeAslRequest(fr);
- }
- }
-
- /* -------------------- Petite routine d' Affichage de texte ------- */
-
- void Print(int x,int y, char *string)
- { short count=0;
- char *c;
-
- if (QuietMode) return;
-
- if (MODE == MODE_WB)
- {
- Move(ILBMViewerWnd->RPort,18+x,56+y);
- c=string; while (*c++) ++count;
- Text(ILBMViewerWnd->RPort,string,count);
- }
- else printf("%s",string);
- }
-
- /* ---------------- Monsieur PROPRE --------------- */
-
- void Clear()
- {
- SetAPen(ILBMViewerWnd->RPort,0);
- RectFill(ILBMViewerWnd->RPort,12,50,315,78);
- SetAPen(ILBMViewerWnd->RPort,1);
- }
-
-
- /* -------------------- Routine d'ATTENTE ------------- */
-
- void WaitClick()
- {
- short j;
-
- UWORD *RightMouseButton = (UWORD *)0xdff016;
- /* ON tape direct dans le hard */
- /* Oui je sais c'est pas Bô */
-
- if (delay == -1)
- while (*RightMouseButton & 0x400) Delay(1);
- else
- for (j=0; j<delay*10; j++)
- {
- Delay(5);
- if ( !(*RightMouseButton & 0x0400)) break;
- }
-
- }
-
-